﻿
@{
    ViewBag.Title = "edit";
}
@model Himall.Web.Models.SiteSettingModel


<script type="text/javascript">
    $(function () {
        $("#SiteName").focus();
    });
</script>
<div class="container">
    <!--<ul class="nav nav-tabs-custom clearfix">
        <strong>预付款设置</strong>
    </ul>-->
    @using (Html.BeginForm("Edit", "SiteSetting", FormMethod.Post))
    {
        <div class="form-horizontal">
        @*<div class="form-group">
            <label class="col-sm-2 control-label" for="">预付款百分比：</label>
            <div class="col-sm-4">@Html.EditorFor(item => item.AdvancePaymentPercent, new { htmlAttributes = new { @class = "form-control input-sm", onkeyup = "value = value.replace(/[^\\d\\.]/g, '')" } })</div>
            <div class="col-sm-4">
                <p class="help-default">例如：预付款百分比为采购总额的40%则填写0.4。</p>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label" for="">预付款上限：</label>
            <div class="col-sm-4">@Html.EditorFor(item => item.AdvancePaymentLimit, new { htmlAttributes = new { @class = "form-control input-sm", onkeyup = "value = value.replace(/[^\\d\\.]/g, '')" } })</div>
        </div>*@
            <div class="form-group">
                <label class="col-sm-2 control-label" for="">未付款超时：</label>
                <div class="col-sm-4">@Html.EditorFor(item => item.UnpaidTimeout, new { htmlAttributes = new { @class = "form-control input-sm", onkeyup = "value = value.replace(/[^\\d]/g, '')" } })</div>
                <div class="col-sm-4">
                    <p class="help-default">按小时计算</p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="">确认收货超时：</label>
                <div class="col-sm-4">@Html.EditorFor(item => item.NoReceivingTimeout, new { htmlAttributes = new { @class = "form-control input-sm", onkeyup = "value = value.replace(/[^\\d]/g, '')" } })</div>
                <div class="col-sm-4">
                    <p class="help-default">按天数计算</p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="">订单退货期限：</label>
                <div class="col-sm-4">@Html.EditorFor(item => item.SalesReturnTimeout, new { htmlAttributes = new { @class = "form-control input-sm", onkeyup = "value = value.replace(/[^\\d]/g, '')" } })</div>
                <div class="col-sm-4">
                    <p class="help-default">按天数计算</p>
                </div>
            </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <input type="button" id="Save" class="btn btn-primary" value="保 存">
            </div>
        </div>
        </div>
    }
</div>
    <script>
        $('#Save').click(function () {
            var loading = showLoading();
            $.post('./Edit', $('form').serialize(), function (result) {
                loading.close();
                if (result.success) {
                    $.dialog.tips('保存成功');
                }
                else
                    $.dialog.errorTips('保存失败！' + result.msg);
            });
        });

    </script>
